<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Key Detection</title>
  <script type="text/javascript" src="http://www.cornify.com/js/cornify.js"></script>
</head>
<body>
<script>
  let pressed = []
  let word = ''
  let secredCode = 'nice'
  window.addEventListener('keyup', (e) => {
    pressed.push(e.key)
    
    word = pressed.join('')
    console.log(word)
    if(word.includes(secredCode)) {
      cornify_add()
      pressed = []
      console.log('ding')
    }
  })
</script>
</body>
</html>
